package com.core.reach.cloudhub.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @author ga.zhang
 * @version V1.0
 * @description: TODO
 * @date 2020/3/25 11:40
 **/
@RestController
public class OrderController {

    private static final String PARAM_URL = "http://cloud-provider-payment";

    @Resource
    private RestTemplate restTemplate;

    @GetMapping("/consumer/consul")
    public String orderConsul(){
        return restTemplate.getForObject(PARAM_URL + "/payment/consul",String.class);
    }
}
